package com.baike.controller;

import com.baike.data.Result;
import com.baike.domain.CategoryDTO;
import com.baike.em.ConstantEnum;
import com.baike.feign.AdvertisingServiceFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;

//@RestController
//@RequestMapping("/category")
//@Api(value = "广告管理接口")
public class TbContentCategoryController {

//    @Autowired
//    private AdvertisingServiceFeign advertisingServiceFeign;
//
//    @GetMapping("广告查询方法")
//    public Result categoryInfo(){
//        Result categoryInfo = advertisingServiceFeign.getCategoryInfo();
//        return categoryInfo;
//    }
//
//    @ApiOperation("广告分类表根据Id 删除方法")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",value = "TbContentCategory实体类字段id",required = true,paramType = "path")
//    })
//    @DeleteMapping("ID/{id}")
//    public Result deleteCategoryById(@PathVariable("id")Integer[] id){
//        Result b = advertisingServiceFeign.deleteCategoryById(id);
//        return b;
//    }
//
//    @ApiOperation("根据Id查询分类表")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",value = "TbContentCategory实体类字段id",required = true,paramType = "path")
//    })
//    @GetMapping("get/{id}")
//    public Result getCategoryById(@PathVariable("id")Integer id){
//        Result contentCategory = advertisingServiceFeign.getCategoryById(id);
//        return contentCategory;
//    }
//
//    @ApiOperation("广告分类增加方法")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "name",value = "分类名称",required = true,paramType = "path"),
//            @ApiImplicitParam(name = "price",value = "价格",required = true,paramType = "path")
//    })
//    @PostMapping("/{name}/{price}")
//    public Result insertCategoryInfo(@PathVariable("name")String name,@PathVariable("price")Double price){
//        Result b = advertisingServiceFeign.insertCategoryInfo(name,price);
//        return b;
//    }
//
//    @ApiOperation("广告分类修改方法")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",value = "广告分类id",required = true,paramType = "path"),
//            @ApiImplicitParam(name = "name",value = "分类名称",required = true,paramType = "path"),
//            @ApiImplicitParam(name = "price",value = "价格",required = true,paramType = "path")
//    })
//    @PutMapping("/{id}/{name}/{price}")
//    public Result updateCategoryInfo(@PathVariable("name")String name,@PathVariable("price")Double price,
//                                     @PathVariable("id")Long id){
//        Result b = advertisingServiceFeign.updateCategoryInfo(name,price,id);
//        return b;
//    }
}
